#!encoding:utf-8


'''记录日志'''

import time,sys,os
import logging
class Log():
    def logOutput(self):
        sys.path.append(os.chdir('./Log'))
        now = time.strftime("%Y%m%d%H%M%S")
        logging.basicConfig(level=logging.DEBUG,
                            format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
                            datefmt='%a, %d %b %Y %H:%M:%S',
                            filename= now +'.log',
                            filemode='w')
        logger = logging.getLogger()
        logger.info(self)
